﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace WindowsRemoteScripting.Action
{
    public class InsertClickCommand : AbstractCommand
    {
        public override void Run(object sender, EventArgs e)
        {
            WindowInfo info = WindowFinder.RetrieveCurrentWindowInfo();

            string sCaption = info.Caption;

            Form1.m_Form.textBoxScript.Text += CreateClickCommand(sCaption);
        }

        public string CreateClickCommand(string _sCaption)
        {
            return string.Format("MouseClick(\"{0}\")", _sCaption);
        }
    }
}
